package org.jeecg.modules.dashboard.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.dashboard.service.IDashBoard;
import org.jeecg.modules.dashboard.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @Description: 驾驶舱
 * @Author: jeecg-boot
 * @Date: 2023-08-18
 * @Version: V1.0
 */
@Api(tags = "驾驶舱")
@RestController
@RequestMapping("/dashboard")
@Slf4j
public class DashBoardController {

    @Autowired
    private IDashBoard iDashBoard;


    @AutoLog(value = "驾驶舱-授信额度")
    @ApiOperation(value = "驾驶舱-授信额度", notes = "驾驶舱-授信额度")
    @PostMapping(value = "/credit")
    public Result<CreditVo> credit() {
        return iDashBoard.queryCredit();
    }

    @AutoLog(value = "驾驶舱-蓝字发票")
    @ApiOperation(value = "驾驶舱-蓝字发票", notes = "驾驶舱-蓝字发票")
    @PostMapping(value = "/lzfp")
    public Result<LzfpVo> lzfp() {
        return iDashBoard.lzfp();
    }

    @AutoLog(value = "驾驶舱-红字发票")
    @ApiOperation(value = "驾驶舱-红字发票", notes = "驾驶舱-红字发票")
    @PostMapping(value = "/hzfp")
    public Result<HzfpVo> hzfp() {
        return iDashBoard.hzfp();
    }

    @AutoLog(value = "驾驶舱-待开单据")
    @ApiOperation(value = "驾驶舱-待开单据", notes = "驾驶舱-待开单据")
    @PostMapping(value = "/dkdj")
    public Result<DkdjVo> dkdj() {
        return iDashBoard.dkdj();
    }

    @AutoLog(value = "驾驶舱-发票统计")
    @ApiOperation(value = "驾驶舱-发票统计", notes = "驾驶舱-发票统计")
    @PostMapping(value = "/fptj")
    public Result<FptjVo> fptj(String type) {
        return iDashBoard.fptj(type);
    }
}
